package com.zpark.eShop.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author: Abigale
 * @Date: 2022/10/18 15:30
 * @Version: 1.0
 */
@Configuration
public class eShopMvcConfig implements WebMvcConfigurer {

    // 配置指定访问路径
    @Override
    public void addViewControllers(ViewControllerRegistry registry){
        // 当访问/路径时跳转到系统首页
        registry.addViewController("/").setViewName("index");
    }
}
